<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="utf-8" />
		<title>v-text与v-html</title>
		<script src="js/vue-2.6.10.js"></script>
	</head>
	<body>
		<div id="app">
			<div v-text="message"></div>
			<div v-html="message"></div>

			<div id="div1"></div>
			<div id="div2"></div>
		</div>
	</body>
	<script>
		//view model
		new Vue({
			el:"#app",
			data: {
				message: "<h1>梦圆大小姐</h1>"
			}
		});

		//传统的innerText和innerHTML
		window.onload = function () {
			document.getElementById("div1").innerHTML = "<h1>大鹏哥</h1>";
			document.getElementById("div2").innerText = "<h1>梦圆大小姐</h1>";
		}
	</script>
</html>
